#include "RamdomNum.h"

RamdomNum::RamdomNum() {
	srand(unsigned(time(NULL)));
}

RamdomNum* RamdomNum::getInstance() {
	if (m_Instance == nullptr)
		m_Instance = new RamdomNum;
	return m_Instance;
}

unsigned int RamdomNum::getRamdomNum() {
	unsigned int num;
	static unsigned int loopTimes = 0;
	for (unsigned int i = 0; i < loopTimes; i++) {
		num = rand();
	}
	num = rand();
	++loopTimes;
	return num;
}
